package com.gxa.day2022_07_29_21.homework.order_system_4.dao;

import com.gxa.day2022_07_29_21.homework.order_system_4.model.Dish;
import com.gxa.day2022_07_29_21.homework.order_system_4.memory_store.MemoryStore;

import java.util.List;

/**
 * @Description:
 * @Author: zhuiyi
 * @CreatTime: 2022/7/30 15:27
 **/
public class DishDao {
    /**
     * 查询所有菜单
     * @return 菜单列表
     */
    public List<Dish> getDishes(){
        return MemoryStore.dishes;
    }

    /**
     * 根据索引下标查找Dish
     * @param idx
     * @return
     */
    public Dish getDishByIndex(int idx){
        return MemoryStore.dishes.get(idx);
    }
}
